home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / imake / imakemdep.h < prev    next >
C/C++ Source or Header  |  1991-10-22  |  8KB  |  359 lines

  1. /*
  2.  * $XConsortium: imakemdep.h,v 1.38 91/08/25 11:36:39 rws Exp $
  3.  * 
  4.  * This file contains machine-dependent constants for the imake utility.
  5.  * When porting imake, read each of the steps below and add in any necessary
  6.  * definitions.  Do *not* edit ccimake.c or imake.c!
  7.  */
  8.  
  9. #ifdef CCIMAKE
  10. /*
  11.  * Step 1:  imake_ccflags
  12.  *     Define any special flags that will be needed to get imake.c to compile.
  13.  *     These will be passed to the compile along with the contents of the
  14.  *     make variable BOOTSTRAPCFLAGS.
  15.  */
  16. #ifdef hpux
  17. #ifdef hp9000s800
  18. #define imake_ccflags "-DSYSV"
  19. #else
  20. #define imake_ccflags "-Wc,-Nd4000,-Ns3000 -DSYSV"
  21. #endif
  22. #endif
  23.  
  24. #if defined(macII) || defined(_AUX_SOURCE)
  25. #define imake_ccflags "-DmacII -DSYSV"
  26. #endif
  27.  
  28. #ifdef stellar
  29. #define imake_ccflags "-DSYSV"
  30. #endif
  31.  
  32. #ifdef att
  33. #define imake_ccflags "-Xc -DSVR4"
  34. #endif
  35.  
  36. #ifdef sony
  37. #ifdef SYSTYPE_SYSV
  38. #define imake_ccflags "-DSVR4"
  39. #else
  40. #include <sys/param.h>
  41. #if NEWSOS < 41
  42. #define imake_ccflags "-Dbsd43 -DNOSTDHDRS"
  43. #else
  44. #define imake_ccflags "-Dbsd43"
  45. #endif
  46. #endif
  47. #endif
  48.  
  49. #ifdef CRAY
  50. /* -DX_NOT_STDC_ENV is just so we can bootstrap with cc instead of scc */
  51. #define imake_ccflags "-DSYSV -DUSG -DX_NOT_STDC_ENV"
  52. #endif
  53.  
  54. #ifdef _IBMR2
  55. #define imake_ccflags "-Daix -DSYSV -D_IBMR2"
  56. #else
  57. #ifdef aix
  58. #define imake_ccflags "-Daix -DSYSV"
  59. #endif
  60. #endif
  61.  
  62. #ifdef Mips
  63. #  if defined(SYSTYPE_BSD) || defined(BSD) || defined(BSD43)
  64. #    define imake_ccflags "-DMips -DBSD43"
  65. #  else 
  66. #    define imake_ccflags "-DMips -DSYSV"
  67. #  endif
  68. #endif 
  69.  
  70. #ifdef is68k
  71. #define imake_ccflags "-Dluna -Duniosb"
  72. #endif
  73.  
  74. #ifdef SYSV386
  75. # ifdef SVR4
  76. #  define imake_ccflags "-Xc -DSVR4"
  77. # else
  78. #  define imake_ccflags "-DSYSV"
  79. # endif
  80. #endif
  81.  
  82. #ifdef __convex__
  83. #define imake_ccflags "-fn -tm c1"
  84. #endif
  85.  
  86. #ifdef apollo
  87. #define imake_ccflags "-DX_NOT_POSIX"
  88. #endif
  89.  
  90. #else /* not CCIMAKE */
  91. #ifndef MAKEDEPEND
  92. /*
  93.  * Step 2:  dup2
  94.  *     If your OS doesn't have a dup2() system call to duplicate one file
  95.  *     descriptor onto another, define such a mechanism here (if you don't
  96.  *     already fall under the existing category(ies).
  97.  */
  98. #if defined(SYSV) && !defined(CRAY) && !defined(Mips)
  99. #define    dup2(fd1,fd2)    ((fd1 == fd2) ? fd1 : (close(fd2), \
  100.                            fcntl(fd1, F_DUPFD, fd2)))
  101. #endif
  102.  
  103.  
  104. /*
  105.  * Step 3:  FIXUP_CPP_WHITESPACE
  106.  *     If your cpp collapses tabs macro expansions into a single space and
  107.  *     replaces escaped newlines with a space, define this symbol.  This will
  108.  *     cause imake to attempt to patch up the generated Makefile by looking
  109.  *     for lines that have colons in them (this is why the rules file escapes
  110.  *     all colons).  One way to tell if you need this is to see whether or not
  111.  *     your Makefiles have no tabs in them and lots of @@ strings.
  112.  */
  113. #if defined(sun) || defined(SYSV) || defined(SVR4) || defined(hcx)
  114. #define FIXUP_CPP_WHITESPACE
  115. #endif
  116.  
  117.  
  118. /*
  119.  * Step 4:  DEFAULT_CPP
  120.  *     If the C preprocessor does not live in /lib/cpp, set this symbol to 
  121.  *     the appropriate location.
  122.  */
  123. #ifdef apollo
  124. #define DEFAULT_CPP "/usr/lib/cpp"
  125. #endif
  126. #if defined(_IBMR2) && !defined(DEFAULT_CPP)
  127. #define DEFAULT_CPP "/usr/lpp/X11/Xamples/util/cpp/cpp"
  128. #endif
  129.  
  130. /*
  131.  * Step 5:  cpp_argv
  132.  *     The following table contains the cpp flags that should be passed to 
  133.  *     cpp whenever a Makefile is being generated.  If your preprocessor 
  134.  *     doesn't predefine any unique symbols, choose one and add it to the
  135.  *     end of this table.  Then, do the following:
  136.  * 
  137.  *         a.  Use this symbol at the top of Imake.tmpl when setting MacroFile.
  138.  *         b.  Put this symbol in the definition of BootstrapCFlags in your
  139.  *             <platform>.cf file.
  140.  *         c.  When doing a make World, always add "BOOTSTRAPCFLAGS=-Dsymbol" 
  141.  *             to the end of the command line.
  142.  * 
  143.  *     Note that you may define more than one symbols (useful for platforms 
  144.  *     that support multiple operating systems).
  145.  */
  146.  
  147. #define    ARGUMENTS 50    /* number of arguments in various arrays */
  148. char *cpp_argv[ARGUMENTS] = {
  149. #ifdef USE_CC_E
  150.     "cc",        /* replaced by the actual cpp program to exec */
  151.     "-E",
  152. #else
  153.     "cpp",        /* replaced by the actual cpp program to exec */
  154. #endif /* USE_CC_E */
  155.     "-I.",        /* add current directory to include path */
  156. #ifdef unix
  157.     "-Uunix",    /* remove unix symbol so that filename unix.c okay */
  158. #endif
  159. #ifdef M4330
  160.     "-DM4330",    /* Tektronix */
  161. #endif
  162. #ifdef M4310
  163.     "-DM4310",    /* Tektronix */
  164. #endif
  165. #if defined(macII) || defined(_AUX_SOURCE)
  166.     "-DmacII",    /* Apple A/UX */
  167. #endif
  168. #ifdef att
  169.     "-Datt",    /* AT&T products */
  170. #endif
  171. #ifdef sony
  172.     "-Dsony",    /* Sony */
  173. #ifndef SYSTYPE_SYSV
  174.     "-Dbsd43",
  175. #endif
  176. #endif
  177. #ifdef _IBMR2
  178.     "-D_IBMR2",    /* IBM RS-6000 (we ensured that aix is defined above */
  179. #ifndef aix
  180. #define aix        /* allow BOOTSTRAPCFLAGS="-D_IBMR2" */
  181. #endif
  182. #endif /* _IBMR2 */
  183. #ifdef aix
  184.     "-Daix",    /* AIX instead of AOS */
  185. #ifndef ibm
  186. #define ibm        /* allow BOOTSTRAPCFLAGS="-Daix" */
  187. #endif
  188. #endif /* aix */
  189. #ifdef ibm
  190.     "-Dibm",    /* IBM PS/2 and RT under both AOS and AIX */
  191. #endif
  192. #ifdef luna
  193.     "-Dluna",    /* OMRON luna 68K and 88K */
  194. #ifdef luna1
  195.     "-Dluna1",
  196. #endif
  197. #ifdef luna88k        /* need not on UniOS-Mach Vers. 1.13 */
  198.     "-traditional", /* for some older version            */
  199. #endif            /* instead of "-DXCOMM=\\#"          */
  200. #ifdef uniosb
  201.     "-Duniosb",
  202. #endif
  203. #ifdef uniosu
  204.     "-Duniosu",
  205. #endif
  206. #endif /* luna */
  207. #ifdef CRAY        /* Cray */
  208.     "-Ucray",
  209. #endif
  210. #ifdef Mips
  211.     "-DMips",    /* Define and use Mips for Mips Co. OS/mach. */
  212. # if defined(SYSTYPE_BSD) || defined(BSD) || defined(BSD43)
  213.     "-DBSD43",    /* Mips RISCOS supports two environments */
  214. # else
  215.     "-DSYSV",    /* System V environment is the default */
  216. # endif
  217. #endif /* Mips */
  218. #ifdef MOTOROLA
  219.     "-DMOTOROLA",    /* Motorola Delta Systems */
  220. # ifdef SYSV
  221.     "-DSYSV", 
  222. # endif
  223. # ifdef SVR4
  224.     "-DSVR4",
  225. # endif
  226. #endif /* MOTOROLA */
  227. #ifdef SYSV386           /* System V/386 folks */
  228.     "-DSYSV386",
  229. # ifdef SVR4
  230.     "-DSVR4",
  231. # endif
  232. # ifdef ISC
  233.     "-DISC",         /* ISC 2.2.1 */
  234. # endif
  235. # ifdef SCO
  236.     "-DSCO",
  237. # endif
  238. # ifdef ESIX
  239.     "-DESIX",
  240. # endif
  241. # ifdef ATT
  242.     "-DATT",
  243. # endif
  244. # ifdef DELL
  245.     "-DDELL",
  246. #endif
  247. #endif
  248. };
  249. #else /* else MAKEDEPEND */
  250. /*
  251.  * Step 6:  predefs
  252.  *     If your compiler and/or preprocessor define any specific symbols, add
  253.  *     them to the the following table.  The definition of struct symtab is
  254.  *     in util/makedepend/def.h.
  255.  */
  256. struct symtab    predefs[] = {
  257. #ifdef apollo
  258.     {"apollo", "1"},
  259. #endif
  260. #ifdef ibm032
  261.     {"ibm032", "1"},
  262. #endif
  263. #ifdef ibm
  264.     {"ibm", "1"},
  265. #endif
  266. #ifdef aix
  267.     {"aix", "1"},
  268. #endif
  269. #ifdef sun
  270.     {"sun", "1"},
  271. #endif
  272. #ifdef hpux
  273.     {"hpux", "1"},
  274. #endif
  275. #ifdef vax
  276.     {"vax", "1"},
  277. #endif
  278. #ifdef VMS
  279.     {"VMS", "1"},
  280. #endif
  281. #ifdef cray
  282.     {"cray", "1"},
  283. #endif
  284. #ifdef CRAY
  285.     {"CRAY", "1"},
  286. #endif
  287. #ifdef att
  288.     {"att", "1"},
  289. #endif
  290. #ifdef mips
  291.     {"mips", "1"},
  292. #endif
  293. #ifdef ultrix
  294.     {"ultrix", "1"},
  295. #endif
  296. #ifdef stellar
  297.     {"stellar", "1"},
  298. #endif
  299. #ifdef mc68000
  300.     {"mc68000", "1"},
  301. #endif
  302. #ifdef mc68020
  303.     {"mc68020", "1"},
  304. #endif
  305. #ifdef __GNUC__
  306.     {"__GNUC__", "1"},
  307. #endif
  308. #if __STDC__
  309.     {"__STDC__", "1"},
  310. #endif
  311. #ifdef __HIGHC__
  312.     {"__HIGHC__", "1"},
  313. #endif
  314. #ifdef CMU
  315.     {"CMU", "1"},
  316. #endif
  317. #ifdef luna
  318.     {"luna", "1"},
  319. #ifdef luna1
  320.     {"luna1", "1"},
  321. #endif
  322. #ifdef luna2
  323.     {"luna2", "1"},
  324. #endif
  325. #ifdef luna88k
  326.     {"luna88k", "1"},
  327. #endif
  328. #ifdef uniosb
  329.     {"uniosb", "1"},
  330. #endif
  331. #ifdef uniosu
  332.     {"uniosu", "1"},
  333. #endif
  334. #endif
  335. #ifdef ieeep754
  336.     {"ieeep754", "1"},
  337. #endif
  338. #ifdef is68k
  339.     {"is68k", "1"},
  340. #endif
  341. #ifdef m68k
  342.         {"m68k", "1"},
  343. #endif
  344. #ifdef m88k
  345.         {"m88k", "1"},
  346. #endif
  347. #ifdef bsd43
  348.     {"bsd43", "1"},
  349. #endif
  350. #ifdef hcx
  351.     {"hcx", 1},
  352. #endif
  353.     /* add any additional symbols before this line */
  354.     {NULL, NULL}
  355. };
  356.  
  357. #endif /* MAKEDEPEND */
  358. #endif /* CCIMAKE */
  359.